package com.fdb.efp.cus.service.dao;

import java.util.List;

import com.fdb.efp.cus.service.domain.CusHandoverApp;
import com.fdb.efp.cus.service.vo.CusHandoverAppVO;
/**
 * <p>DAO interface:客户移交申请				<p>
 * @author chenqm1
 * @date 2018-05-14
 */
public interface CusHandoverAppDao {
	
	public int insertCusHandoverApp(CusHandoverApp cusHandoverApp);
	
	public int deleteByPk(CusHandoverApp cusHandoverApp);
	
	public int updateByPk(CusHandoverApp cusHandoverApp);
	
	public CusHandoverApp queryByPk(CusHandoverApp cusHandoverApp);
	
	public List<CusHandoverApp> queryAllOwnerByPage(CusHandoverAppVO cusHandoverApp);
	
	public List<CusHandoverApp> queryAllCurrOrgByPage(CusHandoverAppVO cusHandoverApp);
	
	public List<CusHandoverApp> queryAllCurrDownOrgByPage(CusHandoverAppVO cusHandoverApp);
	
	/**
	 * 根据条件查询未结束客户移交申请的数量
	 * @param cusHandoverApp
	 * @return
	 */
	public int queryCusHandoverApplyNotEnd(CusHandoverAppVO cusHandoverApp);
	/**
	 * 查询当前登录人下的客户移交审批
	 * @param cusHandoverApp
	 * @return
	 */
	public List<CusHandoverApp> queryApprovalAllOwnerByPage(CusHandoverAppVO cusHandoverApp);
	/**
	 * 查询当前登录人所在机构的客户移交审批
	 * @param cusHandoverApp
	 * @return
	 */
	public List<CusHandoverApp> queryApprovalAllCurrOrgByPage(CusHandoverAppVO cusHandoverApp);
	/**
	 * 查询当前登录所在机构及下属机构的客户移交审批
	 * @param cusHandoverApp
	 * @return
	 */
	public List<CusHandoverApp> queryApprovalAllCurrDownOrgByPage(CusHandoverAppVO cusHandoverApp);
	/**
	 * 查询登录人下所有的客户移交接收
	 * @param cusHandoverApp
	 * @return
	 */
	public List<CusHandoverApp> queryRecvAllOwnerByPage(CusHandoverAppVO cusHandoverApp);
	/**
	 * 查询登录人所在机构下的客户移交接收
	 * @param cusHandoverApp
	 * @return
	 */
	public List<CusHandoverApp> queryRecvAllCurrOrgByPage(CusHandoverAppVO cusHandoverApp);
	/**
	 * 查询登录人所在机构及下属机构的客户移交接收
	 * @param cusHandoverApp
	 * @return
	 */
	public List<CusHandoverApp> queryRecvAllCurrDownOrgByPage(CusHandoverAppVO cusHandoverApp);
	/**
	 * 根据流水号 更新状态
	 * @param cusHandoverAppVO
	 * @return
	 */
	public int updateStatusBySernoCondition(CusHandoverAppVO cusHandoverAppVO);
	/**
	 * 根据流水号 更新日志状态
	 * @param cusHandoverAppVO
	 * @return
	 */
	public int updateLogStatusBySernoCondition(CusHandoverAppVO cusHandoverAppVO);
	/**
	 * 查询所有接收[成功]的客户移交信息
	 * @return
	 */
	public List<CusHandoverApp> queryCusHandoverRescAll();
}
